package com.wnhz.work.yz.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.wnhz.work.yz.BaseActivity;
import com.wnhz.work.yz.R;
import com.wnhz.work.yz.adapter.ChooseCarAdapter;

/**
 * ---选择车辆
 */
public class ChooseCarActivity extends BaseActivity implements View.OnClickListener {
    private TextView title;
    private ListView my_listView;
    private ChooseCarAdapter mAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choose_car);

        initData();
        initView();
    }

    private void initData() {

    }

    private void initView() {
        title = (TextView) findViewById(R.id.view_main_middle_title);
        title.setText("选择车辆");
        findViewById(R.id.btn_main_left).setOnClickListener(this);

        my_listView = (ListView) findViewById(R.id.my_listView);
        mAdapter = new ChooseCarAdapter(this, this);
        my_listView.setAdapter(mAdapter);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_main_left:
                finish();
                break;

            //选择
            case R.id.tv_true:
                MyToast("选择");
                break;

            default:
                break;
        }
    }
}
